package com.example.conf.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 会员卡订单
 * </p>
 *
 * @author wpdcn
 * @since 2020-09-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("member_card_order")
@ApiModel(value="MemberCardOrderEntity对象", description="会员卡订单")
public class MemberCardOrderEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Column(comment = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Column(comment = "会员卡id")
    @ApiModelProperty(value = "会员卡id")
    private Long cardId;

    @Column(comment = "商品id")
    @ApiModelProperty("商品id")
    private Long goodId;

    @Column(comment = "skuid")
    @ApiModelProperty("skuid")
    private Long skuId;

    @Column(comment = "订单号")
    @ApiModelProperty(value = "订单号")
    private String orderNo;

    @Column(comment = "会员id")
    @ApiModelProperty(value = "会员id")
    private String memberId;


    @Column(comment = "手机号")
    @ApiModelProperty("手机号")
    @TableField(exist = false)
    private String userMobile;

    @Column(comment = "姓名")
    @ApiModelProperty("姓名")
    @TableField(exist = false)
    private String realName;

    @Column(comment = "价格")
    @ApiModelProperty(value = "价格")
    private Double price;

    @Column(comment = "现金支付金额")
    @ApiModelProperty("现金支付金额")
    private Double moneyPay;

    @Column(comment = "余额支付金额")
    @ApiModelProperty("余额支付金额")
    private Double balancePay;

    @Column(comment = "配送次数")
    @ApiModelProperty(value = "配送次数")
    private Integer distNum;

    @Column(comment = "配送频率（单位天）")
    @ApiModelProperty(value = "配送频率（单位天）")
    private Integer distFrequency;

    @Column(comment = "会员卡封面图")
    @ApiModelProperty(value = "会员卡封面图")
    private String masterPicUrl;

    @Column(comment = "会员卡标题")
    @ApiModelProperty(value = "会员卡标题")
    private String title;

    @Column(comment = "会员卡描述")
    @ApiModelProperty(value = "会员卡描述")
    private String remarks;

    @Column(comment = "状态：1-未支付；2-待发货；3-已完成")
    @ApiModelProperty(value = "状态：1-未支付；2-待发货；3-已完成")
    private String status;

    @Column(comment = "会员卡使用状态：1-未使用；2-使用中；3-已用完")
    @ApiModelProperty(value = "会员卡使用状态：1-未使用；2-使用中；3-已用完")
    private String useStatus;

    @Column(comment = "收货人")
    @ApiModelProperty("收货人")
    private String receiver;

    @Column(comment = "收货人手机号")
    @ApiModelProperty("收货人手机号")
    private String receiverMobile;

    @Column(comment = "收货人地址")
    @ApiModelProperty("收货人地址")
    private String receiverAddress;

    @Column(comment = "创建时间")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @Column(comment = "支付时间")
    @ApiModelProperty(value = "支付时间")
    private LocalDateTime payTime;

    @Column(comment = "支付流水号")
    @ApiModelProperty(value = "支付流水号")
    private String payNo;

    @Column(comment = "逻辑删除标志")
    @TableLogic
    private Integer delFlag;

    @Column(comment = "最后id")
    private Long lastDistId;

}
